import java.util.Scanner;

public class T7 {
    public static void main(String[] args) {
        int max = 0;
        int count = 1;
    int tmp = 0;
        Scanner scanner = new Scanner(System.in);
       while (true)
       {
           int a = scanner.nextInt();
           tmp++;
           if(a==0)
           {
               break;
           }
           else
           {
               if(a>max)
               {
                   max = a;
               }
               else if(a==max)
               {
                   count++;
               }
           }

       }

          if(tmp==1)
          {
              System.out.println("Only 0 is inputed.");
          }
          else {
              System.out.println("max is:"+max);
              System.out.println("The count of the max number is:"+count);
          }
     /*  }*/

    }
}
